<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Dt_tanya_model extends arfaModel {
    function __construct() {
        parent::__construct();
		$this->table_name	= "dt_pertanyaan";
		$this->primary_key	= "ID_PERTANYAAN";
		$this->order_by		= "ID_PERTANYAAN ASC";
    }

    public function dt_pertanyaan_join_master_pertanyaan($jenis_izin)
    {
    	$this->db->select('*');
    	$this->db->from('dt_pertanyaan');
    	$this->db->join('master_pertanyaan', 'dt_pertanyaan.ID_PERTANYAAN = master_pertanyaan.ID_PERTANYAAN');
    	$this->db->where('dt_pertanyaan.ID_IJIN', $jenis_izin);
    	$this->db->where('master_pertanyaan.STATUS', '1');
    	$query = $this->db->get();

    	return $query->result_array();
    }
}